package com.simtop.hj.service.imp;

import com.simtop.hj.common.ServerResponse;
import com.simtop.hj.mapper.ExcelMapper;
import com.simtop.hj.pojo.TextAnalysisFrequency;
import com.simtop.hj.pojo.*;
import com.simtop.hj.service.ExcelService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExcelServiceImpl implements ExcelService {

    @Autowired
    public ExcelMapper excelMapper;

    private Logger logger= LoggerFactory.getLogger(ExcelServiceImpl.class);

    @Override
    public void exportBrandData(List<BrandData> brandDataList) {
        excelMapper.exportBrandData( brandDataList);
    }

    @Override
    public void exportPreProcessed(List<PreProcessed> processedList) {
        excelMapper.exportPreProcessed(processedList);
    }


    @Override
    public void exportWineProcessed(List<WineProcessed> wineProcessedList) {
        excelMapper.exportWineProcessed(wineProcessedList);
    }


    @Override
    public void exportWineComment(List<WineComment> wineCommentList) {
        excelMapper.exportWineComment(wineCommentList);
    }

    @Override
    public void exportWineInfo(List<WineInfo> wineInfoList) {
        excelMapper.exportWineInfo(wineInfoList);
    }

    @Override
    public void exportWineProduction(List<WineProduction> wineProductionList) {
        excelMapper.exportWineProduction(wineProductionList);
    }


    @Override
    public void exportWineNationwideSale(List<WineNationwideSale> wineNationwideSaleList) {
        excelMapper.exportWineNationwideSale(wineNationwideSaleList);
    }

    @Override
    public void exportWineNationwideYield(List<WineNationwideYield> wineNationwideYieldList) {
        excelMapper.exportWineNationwideYield(wineNationwideYieldList);
    }

    @Override
    public void exportPlatform(List<PlatformData> platformList) {
        excelMapper.exportPlatform(platformList);
    }

    @Override
    public ServerResponse exportPriceData(List<PriceData> priceDataList) {
        Integer checkExportPriceDataStatus=excelMapper.exportPriceData(priceDataList);
        if(checkExportPriceDataStatus!=0){
            return ServerResponse.createBySuccessMsg("添加成功!");
        }else{
            return ServerResponse.createByErrorMsg("添加失败！");
        }
    }

    @Override
    public void exportDirtyData(List<DirtyData> dirtyDataList) {
        Integer checkExportPriceDataStatus=excelMapper.exportDirtyData(dirtyDataList);
    }

    @Override
    public void exportStatisticsData(List<StatisticsData> statisticsDataArrayList) {
        excelMapper.exportStatisticsData(statisticsDataArrayList);
    }

    @Override
    public void exportStatisticsDataCopy(List<StatisticsDataCopy> statisticsDataCopies) {
        excelMapper.exportStatisticsDataCopy(statisticsDataCopies);
    }


    @Override
    public void exportCustomsRisk(List<CustomsRisk> customsRiskList) {
        excelMapper.exportCustomsRisk(customsRiskList);
    }

    @Override
    public void exportPlatformWarn(List<PlatformWarn> platformWarnList) {
        excelMapper.exportPlatformWarn(platformWarnList);
    }

    @Override
    public void exportBusiness(List<Business> businessList) {
        excelMapper.exportBusiness(businessList);
    }

    @Override
    public void exportWineFans(List<WineFans> businessList) {
        excelMapper.exportWineFans(businessList);
    }

    @Override
    public void exportJdComment(List<JdComment> jdCommentList) {
        excelMapper.exportJdComment(jdCommentList);
    }

    @Override
    public void exportProductWord(List<ProductWord> productWordList) {
        excelMapper.exportProductWord(productWordList);
    }

    @Override
    public void exportProductDimension(List<ProductDimension> productDimensionList) {
        excelMapper.exportProductDimension(productDimensionList);
    }

    @Override
    public void exportProductEmotion(List<ProductEmotion> productEmotionList) {
        excelMapper.exportProductEmotion(productEmotionList);
    }

    @Override
    public void exportNegativeProductEmotion(List<NegativeProductEmotion> negativeProductEmotionList) {
        excelMapper.exportNegativeProductEmotion(negativeProductEmotionList);
    }


    @Override
    public void exportTextAnalysis(List<TextAnalysis> textAnalysisList) {
        excelMapper.exportTextAnalysis(textAnalysisList);
    }

    @Override
    public void exportTextAnalysisFrequency(List<TextAnalysisFrequency> textAnalysisFrequencyList) {
        excelMapper.exportTextAnalysisFrequency(textAnalysisFrequencyList);
    }


    @Override
    public void exportBaiDuNews(List<BaiDuNews> baiDuNewsList) {
        excelMapper.exportBaiDuNews(baiDuNewsList);
    }

    @Override
    public void exportSinaNews(List<SinaNews> sinaNewsList) {
        excelMapper.exportSinaNews(sinaNewsList);
    }

    @Override
    public void exportWbTopic(List<WbTopic> wbTopicList) {
        excelMapper.exportWbTopic(wbTopicList);
    }
}
